gltexture: Optionally take a sync object
authorMatthias Clasen <mclasen@redhat.com>
Tue, 25 Apr 2023 09:03:51 +0000 (11:03 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 27 Apr 2023 04:55:37 +0000 (06:55 +0200)
commit92eb845482116ca869ced8183d64f045e1ab3d38
tree2945fd82761b2a4d3c9951243fd552e28eeaa2a3
parent5071e6154caf8590824b3d85333dcd6ff09c55d9
gltexture: Optionally take a sync object

Add a new function to TextureBuilder that takes a GLsync that
requires internal code to wait on before using the texture.

Somewhat sneakily, we don't take the sync if syncs are not supported by
the current GL context.
As public API has no code to query the sync for the destroy notify, this
is fine and it means we don't have to do the check every time we want to
call gdk_texture_get_sync() internally.
gdk/gdkgltexture.c
gdk/gdkgltexturebuilder.c
gdk/gdkgltexturebuilder.h
gdk/gdkgltextureprivate.h